package cn.scnu.model.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * TODO
 *
 * @author hqz
 * @className TableNameEnum
 * @createTime 2024年12月06日 15:06:00
 */
@Getter
public enum TableNameEnum {
    PROJECT_ACCEPTANCE("工程成果_验收"),

    PROJECT_ACHIEVEMENT("工程成果_单体"),

    PROJECT_ACHIEVEMENT_GENERAL_PLAN("工程成果_总平"),;

    @JsonValue
    @EnumValue
    private final String tableName;

    public static Boolean ifEquals(String tableName) {
        for (TableNameEnum nameEnum : TableNameEnum.values()) {
            if (nameEnum.getTableName().equals(tableName)) {
                return true;
            }
        }
        return false;
    }

    TableNameEnum(String tableName) {
        this.tableName = tableName;
    }

}
